﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Data.OleDb;

namespace Emergency.Controls
{
    public partial class FrmNewPlan : DevExpress.XtraEditors.XtraForm
    {
        public FrmNewPlan()
        {
            InitializeComponent();
        }

        private void btnNext_Click(object sender, EventArgs e)
        {
            FrmNewPlanResource frmNewRes = new FrmNewPlanResource();
            this.Close();
            frmNewRes.ShowDialog();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnBrowse_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "场景文件(*.cep)|*.cep";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                txtPath.Text = ofd.FileName;
                btnShowScene.Enabled = true;
              
            }
        }

        private void btnShowScene_Click(object sender, EventArgs e)
        {
            FrmChooseScene frmScene = new FrmChooseScene();
            frmScene.SceneFilePath = txtPath.Text;
            frmScene.ShowDialog();
        }

        private void FrmNewPlan_Load(object sender, EventArgs e)
        {
            string connString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\datasource.accdb";
            OleDbDataAdapter oda = new OleDbDataAdapter("select * from ExerciseStaff", connString);
            DataSet ds = new DataSet();
            oda.Fill(ds);
            gridControl1.DataSource = ds.Tables[0];
            
        }

   

     
    }
}